/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cz.muni.fi.PA165.musiclibraryapi.services;

import cz.muni.fi.PA165.musiclibraryapi.dto.GenreDTOInterface;
import java.util.List;

/**
 * This service allows to manipulate with genres on service layer.
 *
 * @author Jakub Gavornik, 325377
 */
public interface GenreService {
    
    /**
     * Creates new genre in database
     * 
     * @param genre new genre
     * @throws DataAccessException something goes wrong.
     */
    public void createGenre(GenreDTOInterface genre);
    
    /**
     * Returns list of all genres in DB
     * 
     * @return List of genres in DB
     * @throws DataAccessException something goes wrong.
     */
    public GenreDTOInterface getGenre(Long id);
    
    /**
     * Returns genre selected by ID
     * 
     * @param id id of the genre
     * @return selected genre
     * @throws DataAccessException something goes wrong.
     */
    public List<GenreDTOInterface> getAllGenres();
    
    /**
     * Updates existing genre selected by ID and sets new name
     * 
     * @param genre new genre
     * @throws DataAccessException something goes wrong.
     */
    public void updateGenre(GenreDTOInterface genre);
    
    /**
     * Deletes genre
     * 
     * @param genre genre to delete
     * @throws DataAccessException something goes wrong.
     */
    public void deleteGenre(GenreDTOInterface genre);   
    

}
